package com.lingxu.base.system.manage.service.impl;

import com.lingxu.base.system.manage.entity.SysUser;
import com.lingxu.base.system.manage.service.GetMessage;
import org.springframework.stereotype.Service;

/**
 * @Title: GetMessageImpl
 * @Package: com.lingxu.base.system.manage.service.impl
 * @Author: ysj闫世杰
 * @Email: 1105324813@qq.com
 * @Date: Created in 2022/4/12 17:33
 * @Description:
 * @Version: 1.0.0
 */
@Service
public class GetMessageImpl implements GetMessage {

    @Override
    public String getKeyName(SysUser user) {
        return "user:" + user.getUsername();
    }

    @Override
    public String getLoginTimeLockKey(SysUser user) {
        return "user:loginTime:lock:" + user.getUsername();
    }

    @Override
    public String getLoginCountFailKey(SysUser user) {
        return "user:loginCount:fail:" + user.getUsername();
    }

}
